package org.oslims.server.Util;

import java.util.ArrayList;
import java.util.List;

public class StateHelper {

	public static List<String> getLowerStates(String state) {
		List<String> lowerStates = new ArrayList<String>();

		if (state.equals("In Analyzing")) {
			lowerStates.add("Not Recieved");
			lowerStates.add("Not Prepared");
			lowerStates.add("Recieved");
			lowerStates.add("Prepared");
		} else if (state.equals("Measured")) {
			lowerStates.add("Not Recieved");
			lowerStates.add("Not Prepared");
			lowerStates.add("Recieved");
			lowerStates.add("Prepared");
			lowerStates.add("In Analyzing");
		} else if (state.equals("Lab Validated")) {
			lowerStates.add("Not Recieved");
			lowerStates.add("Not Prepared");
			lowerStates.add("Recieved");
			lowerStates.add("Prepared");
			lowerStates.add("In Analyzing");
			lowerStates.add("Measured");
		} else if (state.equals("Scient. Validated")) {
			lowerStates.add("Not Recieved");
			lowerStates.add("Not Prepared");
			lowerStates.add("Recieved");
			lowerStates.add("Prepared");
			lowerStates.add("In Analyzing");
			lowerStates.add("Measured");
			lowerStates.add("Lab Validated");
		} else {
			throw new IllegalArgumentException("Invalid state: " + state);
		}

		return lowerStates;
	}
}
